Telegram Group & Telegram Channel
✏️ Промпт дня: Следуй стандартам кода в C++

Если необходимо быстро привести код к определённому стилю, то этом случае можно воспользоваться следующим промптом.


🍴 Промпт для AI-помощника:

Rewrite the code below following the Google style guidelines for C++.

[Вставь свой код]



‼️ Пример использования промпта:

Было:

class userManager{
public:
int getUserCount(){return userCount;}
void setUserCount(int count){userCount=count;}
private:
int userCount;
};

void ProcessUserData(){
const int maxUsers=100;
userManager um;
for(int i=0;i<maxUsers;i++){
um.setUserCount(i);
}
}


Стало (после применения Google C++ Style Guide):

class UserManager {
public:
int GetUserCount() const { return user_count_; }
void SetUserCount(int count) { user_count_ = count; }

private:
int user_count_;
};

void ProcessUserData() {
const int MAX_USERS = 100;
UserManager user_manager;

for (int i = 0; i < MAX_USERS; ++i) {
user_manager.SetUserCount(i);
}
}


Что изменилось:

Функции в CamelCase
Переменные в snake_case
Константы в UPPER_CASE
Правильные отступы и пробелы


⛄️ А каким стилем для кода вы пользуетесь? Пишите в комментариях.

Библиотека C/C++ разработчика #буст
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/cppproglib/5784
Create:
Last Update:

✏️ Промпт дня: Следуй стандартам кода в C++

Если необходимо быстро привести код к определённому стилю, то этом случае можно воспользоваться следующим промптом.


🍴 Промпт для AI-помощника:

Rewrite the code below following the Google style guidelines for C++.

[Вставь свой код]



‼️ Пример использования промпта:

Было:

class userManager{
public:
int getUserCount(){return userCount;}
void setUserCount(int count){userCount=count;}
private:
int userCount;
};

void ProcessUserData(){
const int maxUsers=100;
userManager um;
for(int i=0;i<maxUsers;i++){
um.setUserCount(i);
}
}


Стало (после применения Google C++ Style Guide):

class UserManager {
public:
int GetUserCount() const { return user_count_; }
void SetUserCount(int count) { user_count_ = count; }

private:
int user_count_;
};

void ProcessUserData() {
const int MAX_USERS = 100;
UserManager user_manager;

for (int i = 0; i < MAX_USERS; ++i) {
user_manager.SetUserCount(i);
}
}


Что изменилось:

Функции в CamelCase
Переменные в snake_case
Константы в UPPER_CASE
Правильные отступы и пробелы


⛄️ А каким стилем для кода вы пользуетесь? Пишите в комментариях.

Библиотека C/C++ разработчика #буст

BY Библиотека C/C++ разработчика | cpp, boost, qt


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/cppproglib/5784

View MORE
Open in Telegram


Библиотека C C разработчика | cpp boost qt Telegram | DID YOU KNOW?

Date: |

Look for Channels Online

You guessed it – the internet is your friend. A good place to start looking for Telegram channels is Reddit. This is one of the biggest sites on the internet, with millions of communities, including those from Telegram.Then, you can search one of the many dedicated websites for Telegram channel searching. One of them is telegram-group.com. This website has many categories and a really simple user interface. Another great site is telegram channels.me. It has even more channels than the previous one, and an even better user experience.These are just some of the many available websites. You can look them up online if you’re not satisfied with these two. All of these sites list only public channels. If you want to join a private channel, you’ll have to ask one of its members to invite you.

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

Библиотека C C разработчика | cpp boost qt from es


Telegram Библиотека C/C++ разработчика | cpp, boost, qt
FROM USA